This is due to WebWork attempting to parse the link ( eg. http://localhost:8080/etg-webapp/secure/reports/byReviewer.action?d-4002248-s=2&etgId=2&etgId=2&d-4002248-o=1 ) using OGNL and OGNL treats eg. d-400248... as minus resulting in the undesired behaviour in dev mode. The sollution would be to have WebWork action implements ParameterNameAware and filter out the offending parameter. public class MyAction extends ActionSupport implements ParameterNameAware { /** * This method will filter out parameters that * start with "d-" followed by a numeric digit, * because parameters of this form are generated by displayTag, * and are treated by webwork as an invalid OGNL expressions causing * webwork to throw an ognl.InappropriateExpressionException exception. * Note that the exception is only thrown when webwork is set in devmode. * However, to prevent this error, the ParameterNameAware interface has been * implemented which requires this method. * This method could be implemented more simply using java's regular expression * support, but such an implementation may suffer from readability except for * people who are very strong in understanding java's RegEX semantics. */ public boolean acceptableParameterName(String parameterName){ boolean retVal = true; if(parameterName!=null && parameterName.startsWith("d-") ) if( parameterName.length()>2) { String thirdCharacter = parameterName.substring(2,3); if(StringUtils.isNumeric(thirdCharacter)){ retVal = false; } } return retVal; } } Special thanks to Richard Wallace and Philip Brown. The detailed dicussion is here |